﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SportsStore.Model
{
  public class PagedResult<T>
  {
    public IList<T> Results { get; set; }
    public int TotalItems { get; set; }
    public int ItemsPerPage { get; set; }
    public int CurrentPage { get; set; }
    public int TotalPages 
    {
      get
      {
        return (int)Math.Ceiling((decimal)TotalItems / ItemsPerPage);
      } 
    }
  }
}
